<?php

class Application_Model_DbTable_Comments extends Zend_Db_Table_Abstract {

    protected $_name = 'comments';

    public static function getCounts($entry_id) {
        $tableComments = new Application_Model_DbTable_Comments();
        $result = $tableComments->fetchAll(
                                $tableComments->select()
                                ->where('entry_id = ?', $entry_id)
        );
        
        return count($result);
    }

}

